﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace MDF.Utilites.Helper
{
    public static class ObjectHelper
    {
        public static string Dump(this object obj)
        {
            try
            {
                String json = JsonConvert.SerializeObject(obj);
                return json;
            }
            catch (Exception ex)
            {
                return "Can't convert json: " + obj.ToString();
            }
        }
    }
}
